//
//  CCFirstPageModel.m
//  CwinCar
//
//  Created by dlios on 15/10/15.
//  Copyright © 2015年 dlios. All rights reserved.
//

#import "CCFirstPageModel.h"

@implementation CCFirstPageModel
-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.newsImage forKey:@"name"];
    [aCoder encodeObject:self.webLink forKey:@"index"];
    [aCoder encodeObject:self.commentCount forKey:@"logo"];
    [aCoder encodeObject:self.newsTitle forKey:@"title"];
    [aCoder encodeObject:self.newsCategory forKey:@"cate"];
    [aCoder encodeObject:self.newsCreateTime forKey:@"create"];
    [aCoder encodeObject:self.imgURL forKey:@"url"];
    [aCoder encodeObject:self.modelID forKey:@"model"];
    
    
}

-(id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.newsImage = [aDecoder decodeObjectForKey:@"name"];
        self.webLink = [aDecoder decodeObjectForKey:@"index"];
        self.commentCount = [aDecoder decodeObjectForKey:@"logo"];
        self.newsTitle = [aDecoder decodeObjectForKey:@"title"];
        self.newsCategory = [aDecoder decodeObjectForKey:@"cate"];
        self.newsCreateTime = [aDecoder decodeObjectForKey:@"create"];
        self.imgURL = [aDecoder decodeObjectForKey:@"url"];
        self.modelID = [aDecoder decodeObjectForKey:@"model"];
        
    
    }
    return self;
}

@end
